<%--
  Created by IntelliJ IDEA.
  User: lichengming
  Date: 2017/8/22
  Time: 下午1:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ include file="/resources.jsp" %>
<html>
<head>
    <title>企管培训配置</title>
    <script>
        $(function () {
            $('#begin_time,#end_time').datetimepicker({
                language : 'zh-CN',
                format : 'yyyy-MM-dd HH:mm:ss'
            });
        })
    </script>
    <style>

        .box{
            display: flex;
            flex-direction:column;
            justify-content:center;
            align-items:center;
            height: 100%;
        }

        .top{
            margin-bottom: 100px;
        }

        .btn-size{
            display: inline-block;
            padding: 6px 12px;
            margin-bottom: 0;
            font-size: 25px;
            font-weight: 400;
            line-height: 2.428571;
            text-align: center;
            white-space: nowrap;
            vertical-align: middle;
            -ms-touch-action: manipulation;
            touch-action: manipulation;
            cursor: pointer;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            background-image: none;
            border: 1px solid transparent;
            border-radius: 4px;
        }

    </style>
</head>
<body>
<div class="container">
    <div class="box">
        <div class="top">
            <button type="button" class="btn-info btn-size" id="config">企管培训属性配置</button>
        </div>
        <div class="bottom">
            <button type="button" class="btn-primary btn-size" id="article">企管培训文章列表</button>
        </div>

    </div>
</div>
<script>

    function statusFormat(srcValue) {

        if (srcValue == 1) {
            return "<span style='color: #3cb371;font-weight: bold' >进行中</span>";
        }else if(srcValue == 2){
            return "<span style='color: red;font-weight: bold'>未开始</span>";
        }else {
            return "<span style='color: #3a575e;font-weight: bold'>已结束</span>";
        }
    }

    $(function () {

        var configId = '${configId}';

        $("#config").on("click",function(){

            window.location.href = "/ems/train/config?id=" + configId;
        })

        $("#article").on("click",function(){
            if(configId == ''){
                $.errorAlert("配置为空，请先添加配置");
                return;
            }
            window.location.href = "/ems/train/article" ;
        })



    });
</script>
</body>
</html>
